package com.team.RunsFast_Api.controller;

import com.team.RunsFast_Api.service.intf.UserSignService;
import com.team.runsfast.entity.UserSign;
import com.team.runsfast.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/userSign/")
@Api
@CrossOrigin
public class UserSignController {

    @Autowired
    private UserSignService userSignService;

    @GetMapping("queryAll")
    public R queryAll(){
        return userSignService.queryAll();
    }

    @GetMapping("createSign")
    public R createSign(String token){
        return userSignService.createSign(token);
    }

    @GetMapping("checkSign")
    public R checkSign(String token){
        return userSignService.checkSign(token);
    }
}
